﻿using System.Collections.Generic;
using Google.Analytics.Common;
using Google.Analytics.Model.Feeds.Attributes;

namespace Google.Analytics.Model.Feeds
{
    public class DataEntry : AnalyticsEntry
    {
        public DataEntry() : base()
        {
            AddExtension(new Dimension());
            AddExtension(new Metric());
        }

        /// <summary>
        /// This field controls the dimensions.
        /// </summary>
        public IList<Dimension> Dimensions
        {
            get
            {
                return FindExtensions<Dimension>(AnalyticsParserNameTable.XmlDimensionElement,
                             AnalyticsParserNameTable.AnalyticsNamespace);
            }
        }

        /// <summary>
        /// This field controls the metrics.
        /// </summary>
        public IList<Metric> Metrics
        {
            get
            {
                return FindExtensions<Metric>(AnalyticsParserNameTable.XmlMetricElement,
                             AnalyticsParserNameTable.AnalyticsNamespace);
            }
        }
    }
}
